#include <iostream>

using namespace std;

class Time
{int hr,min,sec;
    public:
        Time(int x,int y,int z){
            hr=x;
            min=y;
            sec=z;
        }
        void set(int h, int m, int s){
            hr=h;
            min=m;
            sec=s;
        }

        void display(){cout<<hr<<"'"<<min<<"'"<<sec;}
        
        bool equal( Time & other_time ){
            if(other_time.hr==hr&&other_time.min==min&&other_time.sec==sec)
                return true;
            else return false;
        }
};

int main(){
    int x,y ,z;
    
    
    cout<<"输入小时 分钟 秒";
    cin>>x>>y>>z;
    Time a1(x,y,z);
    
    a1.display();
    cout<<"调整为";
    cin>>x>>y>>z;
    a1.set(x,y,z);
    
    cout<<"another time";
    cin>>x>>y>>z;
    
    
    Time a2(x,y,z);
    if(a1.equal(a2))cout<<"same";
    else cout<<"different";

    return 0;
}



